﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HelpType_Manager.aspx.cs" Inherits="Shop_HelpType_Manager" %>

<%@ Register Assembly="Infragistics2.WebUI.UltraWebGrid.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.UltraWebGrid" TagPrefix="igtbl" %>
<%@ Register Assembly="Infragistics2.WebUI.Misc.v7.1, Version=7.1.20071.40, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
    Namespace="Infragistics.WebUI.Misc" TagPrefix="igmisc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>客服中心菜单</title>
    <link href="../Style/main.css" rel="stylesheet" type="text/css" />  
    
    <script type="text/javascript" language="javascript">
     //获取选择行的ID
    function UWGGoodType_AfterRowActivateHandler(gridName, rowId)
    {
        //选择行当前行
        var goodId = igtbl_getRowById(rowId).getCellFromKey("ID").getValue();
        document.getElementById("Hidden1").value = goodId; 
    }

    //验证是否已选中行
    function CheckSelectRow(obj)
    {
        var ID = document.form1.Hidden1.value;
        if(obj=='edit')
        {
            if(ID=="")
            {
                alert("请选择要修改的类别！");
                return false;
            }
        }
        else if(obj=='stop')
        {
            if(ID=="")
            {
                alert("请选择要停用的类别!");
                return false;
            }
            else
            {
                return confirm("确定停用该类别吗？");
            }
        }
        else if(obj='resume')
        {
            if(ID=="")
            {
                alert("请选择要恢复的类别!");
                return false;
            }
            else
            {
                return confirm("确定恢复该类别吗？");
            }
        }
    }        
    
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <br />
    <center>
        <table style="width: 96%; background-color: #85BDE2; vertical-align: middle;" border="0px"
            cellpadding="0px" cellspacing="1px">
            <tr>
                <td colspan="2" style="background-color: #DAE7F8; height:30px;">
                    <strong>客服中心菜单</strong>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td style="width: 15%; text-align: left;">
                    <div id="divScroll" style="overflow-y: auto; overflow-x: auto; width: 146px; height: 350px;">
                    <asp:TreeView ID="TVGoodType" runat="server" Width="100%" Height="300px" ImageSet="Simple"
                        OnSelectedNodeChanged="TVGoodType_SelectedNodeChanged">
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                        <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                            VerticalPadding="0px" />
                        <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="0px"
                            NodeSpacing="0px" VerticalPadding="0px" />
                    </asp:TreeView>
                    </div>
                </td>
                <td style="width: 85%;">
                    <igtbl:UltraWebGrid ID="UWGGoodType" runat="server" Height="300px" Width="100%" OnPageIndexChanged="UWGGoodType_PageIndexChanged"
                        Style="top: 152px; left: -420px">
                        <Bands>
                            <igtbl:UltraGridBand AllowUpdate="No">
                                <SelectedRowStyle BackColor="#99FF66" BorderColor="#99FF33" BorderStyle="Solid" BorderWidth="1px" />
                                <AddNewRow View="NotSet" Visible="NotSet">
                                </AddNewRow>
                                <Columns>
                                    <igtbl:UltraGridColumn BaseColumnName="ID" HeaderText="序号" Key="ID" Width="10%">
                                        <Header Caption="序号">
                                        </Header>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="TypeName" HeaderText="类别名称" Key="TypeName"
                                        Width="25%">
                                        <Header Caption="类别名称">
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="1" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="TypeStatus" HeaderText="状态" Key="TypeStatus"
                                        Width="20%">
                                        <Header Caption="状态">
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="3" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                    <igtbl:UltraGridColumn BaseColumnName="Introduce" HeaderText="介绍" Key="Introduce"
                                        Width="45%">
                                        <Header Caption="介绍">
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Header>
                                        <Footer>
                                            <RowLayoutColumnInfo OriginX="4" />
                                        </Footer>
                                    </igtbl:UltraGridColumn>
                                </Columns>
                            </igtbl:UltraGridBand>
                        </Bands>
                        <DisplayLayout AllowColSizingDefault="Free" AllowColumnMovingDefault="OnServer" AllowSortingDefault="OnClient"
                            AutoGenerateColumns="False" BorderCollapseDefault="Separate" CellClickActionDefault="RowSelect"
                            HeaderClickActionDefault="SortMulti" IndentationTypeDefault="Flat" Name="UWGGoodType"
                            NoDataMessage="没有查询到数据！" RowHeightDefault="20px" SelectTypeRowDefault="Extended"
                            StationaryMargins="Header" StationaryMarginsOutlookGroupBy="True" TableLayout="Fixed"
                            UseFixedHeaders="True" Version="4.00" ViewType="Hierarchical">
                            <GroupByBox Hidden="True" Prompt="">
                                <Style BackColor="ActiveBorder" BorderColor="Window">
                                    </Style>
                            </GroupByBox>
                            <GroupByRowStyleDefault BackColor="Control" BorderColor="Window">
                            </GroupByRowStyleDefault>
                            <ActivationObject BorderColor="" BorderWidth="">
                            </ActivationObject>
                            <FooterStyleDefault BackColor="LightGray" BorderStyle="Solid" BorderWidth="1px">
                                <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                            </FooterStyleDefault>
                            <RowStyleDefault BackColor="Window" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                                Font-Names="Microsoft Sans Serif" Font-Size="8.25pt">
                                <BorderDetails ColorLeft="Window" ColorTop="Window" />
                                <Padding Left="3px" />
                            </RowStyleDefault>
                            <FilterOptionsDefault>
                                <FilterOperandDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid"
                                    BorderWidth="1px" CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                    Font-Size="11px">
                                    <Padding Left="2px" />
                                </FilterOperandDropDownStyle>
                                <FilterHighlightRowStyle BackColor="#151C55" ForeColor="White">
                                </FilterHighlightRowStyle>
                                <FilterDropDownStyle BackColor="White" BorderColor="Silver" BorderStyle="Solid" BorderWidth="1px"
                                    CustomRules="overflow:auto;" Font-Names="Verdana,Arial,Helvetica,sans-serif"
                                    Font-Size="11px" Height="300px" Width="200px">
                                    <Padding Left="2px" />
                                </FilterDropDownStyle>
                            </FilterOptionsDefault>
                            <RowSelectorStyleDefault Width="10px">
                            </RowSelectorStyleDefault>
                            <SelectedRowStyleDefault BackColor="#E4FFCA" BorderColor="#99FF99" BorderStyle="Solid"
                                BorderWidth="1px" Cursor="Hand">
                            </SelectedRowStyleDefault>
                            <HeaderStyleDefault BorderStyle="Solid" Height="26px" HorizontalAlign="Center" VerticalAlign="Middle">
                                <BorderDetails ColorLeft="White" ColorTop="White" WidthLeft="1px" WidthTop="1px" />
                            </HeaderStyleDefault>
                            <EditCellStyleDefault BorderStyle="None" BorderWidth="0px">
                            </EditCellStyleDefault>
                            <FrameStyle BackColor="Window" BorderWidth="1px" Font-Names="Microsoft Sans Serif"
                                Font-Size="8.25pt" Height="300px" Width="100%">
                            </FrameStyle>
                            <Pager AllowPaging="True" MinimumPagesForDisplay="2" NextText="下页" PageSize="80"
                                PrevText="上页" StyleMode="ComboBox" Pattern="&lt;table width=100%&gt;&lt;tr&gt;&lt;td align=left&gt;页码：[currentpageindex]/[pagecount] 每页:[pagesize]条&lt;/td&gt;&lt;td align=right&gt;[default]&lt;td&gt;&lt;/tr&gt;&lt;/table&gt;">
                                <Style BackColor="#FFFF99">
                                    <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White" > </BorderDetails ></Style>
                            </Pager>
                            <AddNewBox>
                                <Style BackColor="Window" BorderColor="InactiveCaption" BorderStyle="Solid" BorderWidth="1px">
                                    <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White" > </BorderDetails ></Style>
                            </AddNewBox>
                            <ClientSideEvents AfterRowActivateHandler="UWGGoodType_AfterRowActivateHandler" />
                        </DisplayLayout>
                    </igtbl:UltraWebGrid>
                </td>
            </tr>
            <tr style="background-color: #DAE7F8;">
                <td colspan="2">
                    <div style="vertical-align: middle; width: 100%; height: 26px; text-align: left">
                        &nbsp;
                        <asp:Button ID="btnAdd" runat="server" Height="22px" Width="90px" Text="新增数据" OnClick="btnAdd_Click" />
                        &nbsp;
                        <asp:Button ID="btnEdit" runat="server" Height="22px" Width="90px" Text="编辑数据" OnClick="btnEdit_Click"
                            OnClientClick="return CheckSelectRow('edit')" />
                        &nbsp;
                        <asp:Button ID="btnStop" runat="server" Height="22px" Width="90px" Text="停用" OnClick="btnStop_Click"
                            OnClientClick="return CheckSelectRow('stop')" />
                        &nbsp;
                        <asp:Button ID="btnResume" runat="server" Height="22px" Width="90px" Text="恢复" OnClick="btnResume_Click"
                            OnClientClick="return CheckSelectRow('resume')" />
                </td>
            </tr>
        </table>
        
        <input id="Hidden1" runat="server" type="hidden" /><br />       
    </center>
    </form>
</body>
</html>
